<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		Broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcastweb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0003																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

$lang =& JFactory::getLanguage();
$params = $this->params;
$jsm_hidden_validate = JRequest::getVar('jsm_hidden_validate', 'direct');
$jsm_hidden_pageload = JRequest::getVar('jsm_hidden_pageload', '');
$jsm_hidden_songid = JRequest::getVar('jsm_hidden_songid', 0);
$jsm_hidden_searchtype = JRequest::getVar('jsm_hidden_searchtype', '');
$jsm_hidden_searchdata = JRequest::getVar('jsm_hidden_searchdata', '');
$jsm_hidden_pagenum = JRequest::getVar('jsm_hidden_pagenum', 0);
$jsm_hidden_task = JRequest::getVar('jsm_hidden_task', '');
$jsm_hidden_pageconf = $params->search->chars;
$jsm_hidden_language = $lang->getTag();
$ajurl = JRoute::_('?option=com_joosam&view=xmldata&loader=search&format=raw');
?>

<form id="jsm_form" name="jsm_form" action="" method="POST" onsubmit="return false;">
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_validate" name="jsm_hidden_validate" value="<?php echo $jsm_hidden_validate; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_pageload" name="jsm_hidden_pageload" value="<?php echo $jsm_hidden_pageload; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_songid" name="jsm_hidden_songid" value="<?php echo $jsm_hidden_songid; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_searchtype" name="jsm_hidden_searchtype" value="<?php echo $jsm_hidden_searchtype; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_searchdata" name="jsm_hidden_searchdata" value="<?php echo $jsm_hidden_searchdata; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_pagenum" name="jsm_hidden_pagenum" value="<?php echo $jsm_hidden_pagenum; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_task" name="jsm_hidden_task" value="<?php echo $jsm_hidden_task; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_pageconf" name="jsm_hidden_pageconf" value="<?php echo $jsm_hidden_pageconf; ?>"/>
	<input type="hidden" class="jsm_hiddendata" id="jsm_hidden_language" name="jsm_hidden_language" value="<?php echo $jsm_hidden_language; ?>"/>
	<div class="jsm_search" id="jsm_search_id"> <?php
		if($params->search->display == 'block'): ?>
			<label for="jsm_search_box"><?php echo JText::_('COM_JOOSAM_VIEW_HEADER_SEARCH'); ?> </label>
			<input type="text" autocomplete="off" class="jsm_input_text" name="jsm_search_box" id="jsm_search_box" onkeydown="return joosam.keycheck(event);" onkeyup="joosam.ajax_search('<?php echo $ajurl; ?>', 'GET', 'jsm_search_id', 'song', '<?php echo $jsm_hidden_pageconf; ?>', event)" /><?php
		endif; ?>
	</div> <?php
	if($params->search->letters_active == 'show'): ?>
		<div id="jsm_search_letter">
			<button class="jsm_button" id="jsm_search_button_nolet" onclick="return joosam.goletter('nolet');">#</button><?php
			foreach(range('A','Z') as $letter): ?>
				<button class="jsm_button" id="jsm_search_button_<?php echo $letter; ?>" onclick="joosam.goletter('<?php echo $letter; ?>'); return false;"><?php echo $letter; ?></button><?php
			endforeach; ?>
		</div> <?php
	endif;